<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page import="java.util.List"%>
<%@ page import="com.dun.re.vo.Expenditure"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>My Spendings</title>
</head>
<body>

		<table border="1">
			<tr>
				<td>SNO</td>
				<td>BY WHOM</td>
				<td>DESCRIPTION</td>
				<td>ON WHOM</td>
				<td>AMOUNT</td>
				<td>SPENT DATE</td>
			</tr>
			<c:choose>
     		 <c:when test="${not empty expenditureList}">
      			<c:forEach items="${expenditureList}" var="expenditure">
				<tr>
					<td><c:out value="${expenditure.sno}"/></td>
					<td><c:out value="${expenditure.byWhom}"/></td>
					<td><c:out value="${expenditure.description}"/></td>
					<td><c:out value="${expenditure.onWhom}"/></td>
					<td><c:out value="${expenditure.amount}"/></td>
					<td><c:out value="${expenditure.spentDate}"/></td>
				</tr>
			</c:forEach>
			</c:when>
			<c:when test="${not empty spendingsOnMe}">
      			<c:forEach items="${spendingsOnMe}" var="expenditure">
				<tr>
					<td><c:out value="${expenditure.sno}"/></td>
					<td><c:out value="${expenditure.byWhom}"/></td>
					<td><c:out value="${expenditure.description}"/></td>
					<td><c:out value="${expenditure.onWhom}"/></td>
					<td><c:out value="${expenditure.amount}"/></td>
					<td><c:out value="${expenditure.spentDate}"/></td>
				</tr>
			</c:forEach>
			</c:when>
			</c:choose>
		</table>
</body>
</html>